1. Field of the Invention
The present invention relates to dispatch control of a virtual machine, and in particular, to a dispatch control method and a dispatch control system which effectively utilize each processor in a virtual machine system constructed in a multiprocessor configuration.
2. Description of the Prior Art
A virtual machine system (to be abbreviated as a VMS herebelow) is a system in which one or more operating systems (OS's) are allowed to achieve a simultaneous operation under the control of a machine. A virtual machine control program (to be abbreviated as a VMCP herebelow) is a program effecting a control to implement a system in which a machine called a virtual machine (to be abbreviated as a VM herebelow) seems to exist for each OS in a real machine.
To enable one or more OS's to run at the same time, the VMS is required to perform a change-over processing between virtual processors on a VM using processors of the machine. Heretofore, a privileged instruction issued from an OS is simulated by the VMCP; however, to speed up the processing, there have been developed techniques for effecting a higher operation by use of a microprogram simulation and for directly executing the priviledged instruction by a hardware. In a virtual machine system, if selection and activation of a virtual processor to be next operated are softwarewise accomplished, the overhead of the software becomes considerably great.
For example, the JP-A-59-167756 describes a method in which when a virtual processor enters an idle state or the like in a processor of a machine, the virtual processor is changed over by use of a hardware and a microprogram. According to this method, an efficient usage is implemented for a processor on which the virtual processor set to the idle state was running.
In the method above, however, an efficient usage has not been described for a processor in a case of a VM in the multiprocessor configuration where an OS effects a loop in a first virtual processor of the VM because of a lock of another virtual processor on the same VM. Although an efficient utilization has been described for a processor on which the virtual processor set to the idle state or the like was running, an efficient usage has not been described for another processor not in an active state at this point of time.
A task (or a process) is a unit of a job to be processed in a computer system, and when all necessary resources other than a CPU are reserved, the task enters an executable state waiting for an allocation of the CPU. A task waiting for an execution because the resources other than a CPU cannot be reserved installed to be in the wait state. When the CPU is allocated to a task in the executable state, the task enters an active state. If a task being executed is robbed of the CPU by a task having a higher priority, the task returns to the executable state. That is, a task is in the active, executable, or wait state. The CPU is allocated to a task in the executable state by a dispatcher, which controls the CPU to supervise execution of tasks and is a special part constituting the kernel of the OS.